package com.assessment.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.assessment.config.RoleConverter;
import com.baomidou.mybatisplus.annotation.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author 鑫十一
 * @since 2021-12-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Arole implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 这个表主要是存储角色信息，类型分为人员和部门，对应people和department
     */
    @ExcelIgnore
    @TableId(value = "id", type = IdType.ID_WORKER)
    private String id;

    @ExcelIgnore
    @JsonIgnore
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;


    @JsonIgnore
    @ExcelIgnore
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    @ExcelIgnore
    @JsonIgnore
    @TableLogic
    private Integer deleted;

    @ExcelIgnore
    @JsonIgnore
    @Version
    private Integer version;

    /**
     * 角色名
     */
    @ExcelProperty("角色名")
    private String name;

    /**
     * 角色所属类型（人员/部门）
     */
    @ExcelProperty(value = "角色所属部门（人员/部门）", converter = RoleConverter.class)
    private String type;

    /**
     * 角色所属类型（人员/部门）
     */
    @ExcelProperty("角色位次")
    private Integer rsit;

}
